3 research outputs found

    POSIX lexing with derivatives of regular expressions (proof pearl)

    Get PDF
    Brzozowski introduced the notion of derivatives for regular expressions. They can be used for a very simple regular expression matching algorithm. Sulzmann and Lu cleverly extended this algorithm in order to deal with POSIX matching, which is the underlying disambiguation strategy for regular expressions needed in lexers. Sulzmann and Lu have made available on-line what they call a “rigorous proof” of the correctness of their algorithm w.r.t. their specification; regrettably, it appears to us to have unfillable gaps. In the first part of this paper we give our inductive definition of what a POSIX value is and show (i) that such a value is unique (for given regular expression and string being matched) and (ii) that Sulzmann and Lu’s algorithm always generates such a value (provided that the regular expression matches the string). We also prove the correctness of an optimised version of the POSIX matching algorithm. Our definitions and proof are much simpler than those by Sulzmann and Lu and can be easily formalised in Isabelle/HOL. In the second part we analyse the correctness argument by Sulzmann and Lu and explain why the gaps in this argument cannot be filled easily.Postprin

    LL(1) Parsing with Derivatives and Zippers

    Full text link
    In this paper, we present an efficient, functional, and formally verified parsing algorithm for LL(1) context-free expressions based on the concept of derivatives of formal languages. Parsing with derivatives is an elegant parsing technique, which, in the general case, suffers from cubic worst-case time complexity and slow performance in practice. We specialise the parsing with derivatives algorithm to LL(1) context-free expressions, where alternatives can be chosen given a single token of lookahead. We formalise the notion of LL(1) expressions and show how to efficiently check the LL(1) property. Next, we present a novel linear-time parsing with derivatives algorithm for LL(1) expressions operating on a zipper-inspired data structure. We prove the algorithm correct in Coq and present an implementation as a parser combinators framework in Scala, with enumeration and pretty printing capabilities.Comment: Appeared at PLDI'20 under the title "Zippy LL(1) Parsing with Derivatives

    Perceptions of Parents towards COVID-19 Vaccination in Children, Aseer Region, Southwestern Saudi Arabia

    No full text
    Vaccines are an important part of the COVID-19 pandemic response plan. This cross-sectional study aims to assess the attitude and perception levels of parents toward COVID-19 vaccines for children aged 0–18 years in the Aseer region of Saudi Arabia. Data were analyzed using SPSS version 16.0. Out of a total of 1463 parents, 30.6% assumed that COVID-19 vaccination may be more dangerous for children than adults. Nearly 36.5% parents don’t have any concern about children’s vaccination. About 12.8% of children have not received the vaccination, 55% of parents have some sort of hesitation and 32.2% of parents did not hesitate before vaccinating their children against COVID-19. Only 15.4% of parents expect that the COVID-19 vaccine affects their child’s genes. About 23.4% parents strongly agreed and 35.1% agreed about the importance of getting their children vaccinated. About 22.1% of parents strongly agreed and 33.3% agreed regarding their willingness to get their children vaccinated to prevent Coronavirus disease. More than 80% of parents recommended rushing to receive the COVID-19 vaccine. Health professionals and policymakers should implement and support strategies to ensure children are vaccinated for COVID-19. They also need to educate parents and families regarding childhood vaccination
    corecore